package com.healthcloud.service.impl;

import com.healthcloud.dao.BoneLooseDao;
import com.healthcloud.entity.BoneLoose;
import com.healthcloud.service.BoneLooseService;
import com.healthcloud.utils.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("boneLooseService")
@Transactional
public class BoneLooseServiceImpl implements BoneLooseService {
	@Autowired
	private BoneLooseDao boneLooseDao;

	@Override
	public List<BoneLoose> queryList(BoneLoose entity, PageParam pageParam) {
		return boneLooseDao.queryList(entity, pageParam);
	}

	@Override
	public Integer queryTotal(BoneLoose entity) {
		return boneLooseDao.queryTotal(entity);
	}

	@Override
	public void saveOrUpdate(BoneLoose entity) {
		if (entity.getId()==null){
			boneLooseDao.save(entity);
		}else {
			boneLooseDao.update(entity);
		}
	}

	@Override
	public BoneLoose queryOne(BoneLoose entity) {
		return boneLooseDao.queryOne(entity);
	}
}
